package com.ang.function.fun01;

import org.springframework.beans.BeanUtils;

import java.text.SimpleDateFormat;
import java.util.function.Function;

public interface FunctionInterface {

    Function<User, UserVO> user2vo = u -> {
        UserVO vo = new UserVO();
        BeanUtils.copyProperties(u,vo);
        vo.setBirth(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(u.getBirth()));

        return vo;
    };
}
